package behavior.visitor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author dali
 * @date 2021-07-23 18:28
 * @Description ObjectStructure
 */

public class LoveCompany {
    private List<Worker> employee= new ArrayList<>();

    public LoveCompany() {
        employee.add(new Lee());
        employee.add(new Ray());
    }

    public void build(Visitor visitor){
        for (Worker slave : employee) {
            slave.accept(visitor);
        }
    }
}
